<!-- 
    Document   : search_dealer_storage
    Created on : Jun 15, 2012, 11:16:05 PM
    Author     : praneeth-->

<%@page import="java.sql.*"  %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>search_dealer_storage JSP Page</title>
    </head>
    <body>    <h3> Enter Proper values...!</h3>
         
             <% 
       try{     
             Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
           String a=request.getParameter("area");             
           // System.out.println("area:"+a);
           
      String q1="select DEALER_ID,DEALER_NAME, ADD from DEALERACC WHERE area='"+a+"'";
          
       System.out.println(q1);
       
        Connection connection = DriverManager.getConnection("jdbc:odbc:egasdsn");
        Statement stmt =connection.createStatement();
        
        
       
        ResultSet rs =stmt.executeQuery(q1);
            while(rs.next()){
                String did=rs.getString(1);
                String dname=rs.getString(2);
                String add=rs.getString(3);
                out.println("dealerid:"+did+" Dname:"+dname+" Area:"+add);         
              //  String ha=rs.getString(4);
                  }
         //           
         
           //  {

         
         //}                  
            
               
        }catch(Exception e){
        }
       

    %></body>
</html>
                